package org.example.group.repository;

import org.apache.ibatis.annotations.Param;
import org.example.group.entity.Group;
import org.example.group.entity.GroupUser;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface GroupRepository {
    List<Group> getgrouplist(@Param("UserEmail") String UserEmail);

    int addGroup(Group group);

    int joinGroup(@Param("groupId")Integer groupId, @Param("userEmail")String userEmail,  @Param("userPicture")String userPicture);

    Group selectGroup(String groupId);

    int outGroup(@Param("groupId")Integer groupId, @Param("userEmail") String userEmail);

    List<GroupUser> getUserByGroup( @Param("groupId")String groupId);
}
